home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 2010 April / PCWorld0410.iso / hity wydania / Ubuntu 9.10 PL / karmelkowy-koliberek-desktop-9.10-i386-PL.iso / casper / filesystem.squashfs / var / lib / dpkg / info / libpam-modules.postinst < prev    next >
Text File  |  2009-09-04  |  816b  |  31 lines

  1. #!/bin/sh -e
  2.  
  3. # If the user has removed the config file, respect this sign of dementia
  4. # -- only create on package install.
  5.  
  6. if [ -z "$2" ] || dpkg --compare-versions "$2" lt 0.99.7.1-3
  7. then
  8.     if ! [ -f /etc/security/opasswd ]; then
  9.         umask 066
  10.         touch /etc/security/opasswd
  11.         umask 022
  12.     fi
  13. fi
  14.  
  15. if dpkg --compare-versions "$2" lt 0.99.9.0-1 && ! [ -f /etc/environment ]
  16. then
  17.     touch /etc/environment
  18. fi
  19.  
  20. # Add PATH to /etc/environment if it's not present there or in
  21. # /etc/security/pam_env.conf
  22. if [ "$1" = "configure" ] && (dpkg --compare-versions 0.79-3ubuntu6 ge "$2" || [ "$2" = "" ]); then
  23.     if ! grep -qs ^PATH /etc/security/pam_env.conf; then
  24.         if ! grep -qs ^PATH /etc/environment; then
  25.             echo 'PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games"' >> /etc/environment
  26.         fi
  27.     fi
  28. fi
  29.  
  30.  
  31.